package lyh.service;

import org.junit.runners.model.InitializationError;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.Log4jConfigurer;

import java.io.FileNotFoundException;

/**
 * Created by DXM_0010 on 2018/11/6.
 */
public class Junit4ClassRunner extends SpringJUnit4ClassRunner {
    static {
        try {
             Log4jConfigurer.initLogging("classpath:conf/log4j2.xml");
        }catch (FileNotFoundException ex){
            System.err.println("Cannot Initialize log4j");
        }
    }
    public Junit4ClassRunner(Class<?> clazz) throws InitializationError {
        super(clazz);
    }
}
